using Godot;

[GlobalClass]
public partial class EntityStat : Resource
{
    [Export] public int MaxHp = 100;
    [Export] public int MoveSpeed = 200;
    [Export(PropertyHint.Range, "0,1")] public int SpeedModifier = 1;
    
    public int CurrentHp { get; private set; }
    
    public void Initialize()
    {
        CurrentHp = MaxHp;
    }
    
    public void TakeDamage(int damage)
    {
        CurrentHp = Mathf.Max(CurrentHp - damage, 0);
    }
}